package com.tourism.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tourism.domain.entity.Favorite;
import com.tourism.service.FavoriteService;
import com.tourism.mapper.FavoriteMapper;
import com.tourism.core.security.util.SecurityHolderUtils;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class FavoriteServiceImpl extends ServiceImpl<FavoriteMapper, Favorite>
    implements FavoriteService{

    @Override
    public List<Favorite> getAllFavoritesByUserId() {
        return baseMapper.getAllFavoritesByUserId(SecurityHolderUtils.getUserId());
    }
}




